// LightCtrl.h: interface for the CLight class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LIGHT_H__3DC337C0_671B_4285_B0FE_F947D569A3C3__INCLUDED_)
#define AFX_LIGHT_H__3DC337C0_671B_4285_B0FE_F947D569A3C3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef _MV_7_


struct PortMap;

class CLightCtrl : public CLight
{
public:
	CLightCtrl();
	~CLightCtrl();

	void AbsoluteLightOff();
	void SetPortMap(PortMap* pPortMap);

	BOOL LightOn(LightInfo* pLightInfo, CStdioFile *file = NULL);
	BOOL LightOff();
	LightInfo* GetLightInfo();
	void GetLightInfo(LightInfo& lightInfo);

	void SendLightLevel(long nSelect, BYTE nLevel);

private:
	void SendLightLevel16(long nSelect, BYTE nLevel);
	void SelectLightType16(int port, BOOL value);

	void SendLightLevel32(long nSelect, BYTE nLevel);
	void SelectLightType32(long nSelect, BOOL flag);

	//long ModifyIndex(long nSelect);

private:
	PortMap* m_pPortMap;
	long m_outPortValue16;
};

#endif

#endif // !defined(AFX_LIGHT_H__3DC337C0_671B_4285_B0FE_F947D569A3C3__INCLUDED_)
